export interface NoticeMessage<T extends NoticeMessagePayload> {
    /** 通知类型 */
    type: SystemNoticeType;
    /** 通知内容 */
    payload: T;
}

/** SystemNoticeType  */
export const SystemNoticeType = {
    FRIEND_ONLINE_NOTICE: 1,
    FRIEND_OFFLINE_NOTICE: 2,
    SYSTEM_TIP_NOTICE: 3,
} as const;

export type SystemNoticeType = typeof SystemNoticeType[keyof typeof SystemNoticeType];

export interface NoticeMessagePayload {}

// region NoticeMessagePayload

/**
 *
 */
export interface FriendOnlinePayload extends NoticeMessagePayload {
    friendId: string;
}

export interface FriendOfflinePayload extends NoticeMessagePayload {
    friendId: string;
    /** 离线时间，建议用字符串表示ISO时间 */
    offlineTime: string;
}

export interface SystemAnnouncementPayload extends NoticeMessagePayload {
    /** 公告内容 */
    content: string;
}

// endregion